# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=zeroconf-ioslave
pkgver=20.04.3
pkgrel=0
arch="all !armhf"
url="https://www.kde.org/applications/internet/"
pkgdesc="Network Monitor for DNS-SD services (Zeroconf)"
license="GPL-2.0-or-later AND LGPL-2.0-only AND GFDL-1.2-only"
makedepends="extra-cmake-modules qt5-qtbase-dev kdbusaddons-dev kdnssd-dev ki18n-dev kio-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/zeroconf-ioslave-$pkgver.tar.xz"
subpackages="$pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="bba7d5ae7a9d0b6ddf0e0aa1b110b9b20c2c4c8078f4b720b8abc0f0761db342b88b8195088f28306f979091847834948e13931db5de14e9b7c474c1c997a821  zeroconf-ioslave-20.04.3.tar.xz"
